package ambartakip;

import java.awt.Component;
import java.awt.Container;
import javax.swing.JInternalFrame;
import javax.swing.JTextField;

public class _GenelListe {

    public static void formorta(JInternalFrame kont, int _width, int _height) {
        //  kont.setSize(1000, 400);
        kont.setLocation(_width / 2 - kont.getSize().width / 2, _height / 2 - kont.getSize().height / 2);
        kont.setVisible(true);
        AnaForm.jDesktopPane1.add(kont);
        kont.moveToFront();
    }

    public static void resetTextFields(Container c) {
        Component[] components = c.getComponents();
        for (Component component : components) {
            if (component instanceof Container) {
                resetTextFields((Container) component);
            } else if (component instanceof JTextField) {
                ((JTextField) component).setText("");
            }
        }
    }
}
